home *** CD-ROM | disk | FTP | other *** search
/ SGI O2 Out of Box Experience / SGI O2 Out of Box Experience.iso / jungleIsland / critters / turtle.wrl < prev   
Text File  |  1996-11-14  |  5KB  |  240 lines

  1. #VRML V2.0 utf8
  2.  
  3. # Inline { url "bbox.wrl" }
  4.  
  5. Group {
  6. children [
  7.  
  8. DEF TURTLE Transform {
  9.     children Group { children [    
  10.         DEF SHELL Transform {
  11.            children Shape {
  12.             appearance Appearance {
  13.              material      Material {
  14.             ambientIntensity      0.25
  15.                   diffuseColor  0.540541 0 0
  16.                   specularColor 0.938776 0.0550317 0.0550317
  17.                   emissiveColor 0 0 0
  18.                   shininess     0.0648649
  19.                   transparency  0
  20.  
  21.         # blue
  22.                 # ambientIntensity        0.248407
  23.                 # diffuseColor    0.08 0.114827 0.546465
  24.                 # specularColor   0.117347 0.0638623 0.0624524
  25.                 # emissiveColor   0 0 0
  26.                 # shininess       0.0918367
  27.                 # transparency    0
  28.  
  29.         # brown 
  30.         # ambientIntensity    0.0227273
  31.          #            diffuseColor        0.314286 0.0743647 0
  32.           #           specularColor       0.780612 0.691177 0.397036
  33.            #          emissiveColor       0 0 0
  34.             #         shininess   0.107143
  35.              #        transparency        0
  36.  
  37.           }
  38.             }
  39.  
  40.             geometry IndexedFaceSet {
  41.                 coord Coordinate {
  42.                     point [ 0 0 .8,
  43.                         1.25 0 .8,
  44.                         -1 0 0,
  45.                         0 .5 0,
  46.                         1.25 .5 0,
  47.                         2.25 0 0,
  48.                         -1 0 -1,
  49.                         0 .5 -1,
  50.                         1.25 .5 -1,
  51.                         2.25 0 -1,    
  52.                         0 0 -1.8,
  53.                         1.25 0 -1.8 ]
  54.                 }
  55.                 coordIndex [ 0, 3, 2, -1,
  56.                         0, 1, 4, 3, -1,
  57.                         1, 5, 4, -1,
  58.                         2, 3, 7, 6, -1,
  59.                         3, 4, 8, 7, -1,
  60.                         4, 5, 9, 8, -1,
  61.                         6, 7, 10, -1,
  62.                         7, 8, 11, 10, -1,
  63.                         8, 9, 11, -1 ]
  64.                 creaseAngle 1.5
  65.             }
  66.             }
  67.         }
  68.         ,
  69.         DEF RIGHTFRONTFOOT Transform {
  70.             children Transform {
  71.                 children DEF FOOT Shape {
  72.                 appearance DEF SKIN Appearance {
  73.                 material  Material {
  74.                 ambientIntensity        0.248407
  75.                         diffuseColor    0.0856263 0.546465  0.11
  76.                         specularColor   0.0638623 0.0624524 0.117347 
  77.                         emissiveColor   0 0 0
  78.                         shininess       0.0918367
  79.                         transparency    0
  80.                           }
  81.                 }
  82.                 geometry IndexedFaceSet {
  83.                     coord Coordinate {
  84.                         point [ 0 0 1,
  85.                             -1 0 0,
  86.                             0 .75 0,
  87.                             1 0 0,
  88.                             0 0 -1 ]
  89.                     }
  90.                     coordIndex [ 0, 2, 1, -1,
  91.                             0, 3, 2, -1,
  92.                             2, 4, 1, -1,
  93.                             2, 3, 4, -1,
  94.                             0, 1, 4, 3, -1 ]
  95.                     creaseAngle 1.8
  96.                 }
  97.                }
  98.                scale .4 .2 .2
  99.             translation 1.75 0 .5
  100.             rotation 0 1 0 -.6    
  101.             }
  102.             center 1.75 0 .5
  103.         }
  104.         ,
  105.         DEF RIGHTBACKFOOT Transform { 
  106.             children Transform {
  107.             children USE FOOT
  108.             scale .4 .2 .2
  109.             translation -.5 0 .5
  110.             rotation 0 1 0 1.2
  111.             }
  112.             center -.5 0 .5
  113.         }
  114.         ,
  115.         DEF LEFTBACKFOOT Transform {
  116.             children Transform {
  117.             children USE FOOT
  118.                         scale .4 .2 .2
  119.                         translation -.5 0 -1.5
  120.                         rotation 0 1 0 -1.2
  121.             }
  122.             center -.5 0 -1.5
  123.         }
  124.         ,
  125.         DEF LEFTFRONTFOOT Transform {
  126.             children Transform {
  127.             children USE FOOT
  128.             scale .4 .2 .2
  129.             translation 1.75 0 -1.5
  130.             rotation 0 1 0 .6
  131.             }
  132.             center 1.75 0 -1.5
  133.         }
  134.         ,
  135.         DEF HEAD Transform {
  136.             children Shape {
  137.                 appearance USE SKIN
  138.                 geometry IndexedFaceSet {
  139.                     coord Coordinate { 
  140.                          point [ 0 0 1,
  141.                                                 -2 0 0,
  142.                                                 0 .75 0,
  143.                                                 1 0 0,
  144.                                                 0 0 -1 ]
  145.                                     }
  146.                                         coordIndex [ 0, 2, 1, -1,
  147.                                                 0, 3, 2, -1,
  148.                                                 2, 4, 1, -1,
  149.                                                 2, 3, 4, -1,
  150.                                                 0, 1, 4, 3, -1 ]
  151.                                     creaseAngle 1.8
  152.                 }
  153.             }
  154.             scale .4 .3 .3
  155.             translation 2.65 0 -.5
  156.             
  157.         }
  158.  
  159.             
  160.     ] }
  161. }
  162. ,
  163. DEF VIS VisibilitySensor {
  164.     size 15 1 3
  165.         center 6 0 -.5
  166. }
  167. ,
  168. DEF TIMER1 TimeSensor {
  169.     loop TRUE
  170.     cycleInterval 2
  171. }
  172. ,
  173. DEF TIMER2 TimeSensor {
  174.     loop TRUE
  175.     cycleInterval 20
  176. }
  177. ,
  178. DEF TURTLEMOVE PositionInterpolator {
  179.     keys [ 0, .05, .1, .15, .2, .25, .3, .35, 
  180.         .4, .45, .5, .55, .6, .65, .7, .75, 
  181.         .8, .85, .9, .95, 1 ]
  182.     values [ 0 0 0,
  183.         1 0 0, 1 0 0,
  184.         2 0 0, 2 0 0,
  185.         3 0 0, 3 0 0,
  186.         4 0 0, 4 0 0,
  187.         5 0 0 , 5 0 0,
  188.         6 0 0, 6 0 0,
  189.         7 0 0, 7 0 0,
  190.         8 0 0, 8 0 0,
  191.         9 0 0, 9 0 0,
  192.         0 0 0, 0 0 0 ]
  193. }
  194. ,
  195. DEF LEFTFEET OrientationInterpolator {
  196.     keys [ 0, .5, 1 ]
  197.     values [ 0 1 0 0, 
  198.         0 1 0 1.2,
  199.         0 1 0 0 ]
  200. }
  201. ,
  202. DEF RIGHTFEET OrientationInterpolator {
  203.     keys [ 0, .5, 1 ]
  204.     values [ 0 1 0 0,
  205.         0 1 0 -1.2,
  206.         0 1 0 0 ]
  207. }
  208. ,
  209. DEF SHELLBOB PositionInterpolator {
  210.     keys [ 0,.25, .5,.75, 1]
  211.     values [
  212.         0 .12 0,
  213.         0 .1 0,
  214.         0 .12 0,
  215.         0 .13 0,
  216.         0 .12 0,
  217.          ]
  218. }
  219.         
  220. ]
  221. }
  222.  
  223. ROUTE VIS.enterTime TO TIMER1.startTime
  224. ROUTE VIS.enterTime TO TIMER2.startTime
  225. ROUTE VIS.exitTime TO TIMER1.stopTime
  226. ROUTE VIS.exitTime TO TIMER2.stopTime
  227. ROUTE TIMER2.fraction TO TURTLEMOVE.set_fraction
  228. ROUTE TURTLEMOVE.value_changed TO TURTLE.set_translation
  229. ROUTE TIMER1.fraction TO LEFTFEET.set_fraction
  230. ROUTE TIMER1.fraction TO RIGHTFEET.set_fraction
  231. ROUTE LEFTFEET.value_changed TO LEFTFRONTFOOT.set_rotation
  232. ROUTE LEFTFEET.value_changed TO LEFTBACKFOOT.set_rotation
  233. ROUTE RIGHTFEET.value_changed TO RIGHTFRONTFOOT.set_rotation
  234. ROUTE RIGHTFEET.value_changed TO RIGHTBACKFOOT.set_rotation
  235. ROUTE TIMER1.fraction TO SHELLBOB.set_fraction
  236. ROUTE SHELLBOB.value_changed TO SHELL.set_translation
  237.         
  238.  
  239.  
  240.